<template>
  <!-- 对话框 -->
  <el-dialog
    :title="title"
    :visible.sync="openSheet"
    append-to-body
    :destroy-on-close="true"
    :close-on-click-modal="false"
    :fullscreen="true"
  >
    <PDFJSViewer :urlpath="url" />
  </el-dialog>
</template>

<script>
import PDFJSViewer from '../PDFJSViewer/PDFJSViewer';
export default {
  name: 'PDFViewerDialog',
  components: { PDFJSViewer },
  props: {
    title: {
      type: String,
      required: true
    },
    url: {
      type: String,
      required: true
    }
  },
  data() {
    return {
      openSheet: false
    };
  },
  methods: {
    openSheetDialog() {
      this.openSheet = !this.openSheet;
    },
    cancel() {
      this.openSheet = !this.openSheet;
    }
  }
};
</script>

<style scoped>
.el-dialog__body {
  padding: 0px;
}
</style>
